//
// Created by 冷月祭诗魂 on 2025/4/23.
//

#ifndef ARRAYLIST_H
#define ARRAYLIST_H


#include "List.h"
#include "IndexOutOfBoundsException.h"
#include <string>
//
// Created by 冷月祭诗魂 on 2025/4/23.
//
template<typename E> class ArrayList : public List<E> {

private:
    E* elementData;
    int32_t _size;
    int32_t capacity;

public:

    ArrayList() ;

    int32_t size();

    bool add(E& e);

    bool add(E&& e);

    bool isEmpty();

    E remove(int32_t index);

    E get(int32_t index);

    ~ArrayList();
};


#endif //ARRAYLIST_H
